function mimonewswallheight(){
	"use strict";
	jQuery('.mimo-no-image').each(function(){
		var thewidth = jQuery(this).width();
		var theheight = thewidth * 0.5625;
		var thepxheight = Math.floor(theheight) + 'px';
		jQuery(this).css({'min-height':thepxheight});
	});
}
function gotoheight(){
	"use strict";
	jQuery('.gotopost, .gotoposthide').each(function(){
	var gotopost = jQuery(this);
	var thegotopostheight = gotopost.parent().outerHeight();
	gotopost.css({ height: thegotopostheight } );
	gotopost.find('.info_inside_normal').css({ height: thegotopostheight } );
	});
}


function mimoheightfunction(){
"use strict"; 
jQuery('.ca-container').each(function(){
	 var caheight = jQuery(this).find('ul li:first-child img').height();
	 jQuery(this).css('height' , caheight);
	 jQuery(this).find('.ca-wrapper').css('height' , caheight);
	 
	 jQuery(this).contentcarousel({visible:true}); 
	 });
}
jQuery(window).load(function(){
	mimoheightfunction();
}) 
jQuery(window).resize( function() {
     mimoheightfunction(); 
});
jQuery(document).ajaxComplete(function(){
	mimoheightfunction(); 

});
jQuery(document).ready(function(){
	"use strict";
	mimonewswallheight();
jQuery('.gallery-size-slider').find('br,p').remove();
jQuery('.gallery-size-slider').addClass('flexslider');
jQuery('.gallery img').css('border','0px'); 

jQuery('.gallery-size-slider').flexslider({
		selector: '.gallery-item',
	    directionNav: true,
		slideshow: false,
		pauseOnAction: true,
		pauseOnHover: true,
		easing: 'swing',
		video:true,
		controlNav: false, 
		before: function(slider){
			if ( jQuery('#youtube_video')[0] ) { 
		callPlayer('youtube_video', 'pauseVideo');}
		if ( jQuery('#player_1')[0] ) { 
		var myid ='player_1';
		jQuery("[id*="+myid+"]").each(function(){
			Froogaloop(  jQuery(this)[0] ).api('pause');});
      	}              //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
 
	  
		}});



jQuery(function() {
"use strict";
	jQuery('ul.da-thumbs > li').hoverdir();
});
});

	jQuery(window).smartresize( function(){
	"use strict";
  	gotoheight();
	});
jQuery(document).ready(function(){
"use strict";
	jQuery('.activator.class').BAToolTip({
            tipOpacity: 0.9,
            tipOffset: 20
        });
    
	var vimeoPlayers = jQuery('.flexslider').find('iframe'), player;        

for (var i = 0, length = vimeoPlayers.length; i < length; i++) {            
        player = vimeoPlayers[i];           
        $f(player).addEvent('ready', ready);        
}       

function addEvent(element, eventName, callback) {           
    if (element.addEventListener) {                 
        element.addEventListener(eventName, callback, false)            
    } else {                
        element.attachEvent(eventName, callback, false);            
    }       
}       

function ready(player_id) {             
    var froogaloop = $f(player_id);             
    froogaloop.addEvent('play', function(data) {                
        jQuery('.flexslider').flexslider("pause");  
          
    });             
    froogaloop.addEvent('pause', function(data) {               
        jQuery('.flexslider').flexslider("play"); 
             
    });         
}  
	jQuery('.connections').css({'border-top':'0px'});
	jQuery('.fbConnectWidgetFooter').hide();
	var fixed = false;
	jQuery(document).scroll(function() {
    if( jQuery(this).scrollTop() >= 10 ) {
        if( !fixed ) {
            fixed = true;
			
            jQuery('.mimologo2').animate({
    opacity: 1,
    width: '39px',
    height: '40px',
	}, 500, function() {
    // Animation complete.
  });
			
			 // Or set top:20px; in CSS
        }                                           // It won't matter when static
    } else {
        if( fixed ) {
            fixed = false;
			
            jQuery('.mimologo2').animate({
    opacity: 0,
    width: '0px',
    height: '0px',
	}, 500);
			
        }
    }
});

 
jQuery(window).scroll(function(){
"use strict";
            if (jQuery(this).scrollTop() > 100) {
                jQuery('#gantry-totop').fadeIn();
            } else {
                jQuery('#gantry-totop').fadeOut();
            }
        }); 
 
jQuery('.scrollup').click(function(){
            jQuery("html, body").animate({ scrollTop: 0 }, 600);
            return false;
        });
 
  
jQuery('.custom_repeatable').sortable({
		opacity: 0.6,
		revert: true,
		cursor: 'move',
		handle: '.sort',
	});

	jQuery('div.ca-content-wrapper').show();
	jQuery('.loading').hide();
	var n = 1;	
	
/* Hovers

********************************************************************************** */
    
	
	
		jQuery('.button_link,button[type=submit],button,input[type=submit],input[type=button],input[type=reset]').hover(
		function() {
				jQuery(this).stop().animate({opacity:0.8},400);
			},
			function() {
				jQuery(this).stop().animate({opacity:1},400);
		});
	jQuery('#newswallmimo-filter li a').hover(function(){
					jQuery(this).stop().animate({padding: '10px 20px'});
					}, function(){
					jQuery(this).stop().animate({padding: '10px 12px'});
				});
	jQuery('.flex-direction-nav a').hover(function(){
					jQuery(this).stop().animate({opacity : 1},'fast');
					}, function(){
					jQuery(this).stop().animate({opacity : 0.7},'fast');
				});
	jQuery('.flexslider, .gallery').hover(function(){
					jQuery(this).children('.flex-direction-nav').stop().animate({height : 'show'},'fast');
					}, function(){
					jQuery(this).children('.flex-direction-nav').stop().animate({height : 'hide'},'fast');
				});
	jQuery('.slideshow, #allimg_id').hover(function(){
					jQuery(this).children('.rslides_nav').stop().animate({opacity : 1},'fast');
					}, function(){
					jQuery(this).children('.rslides_nav').stop().animate({opacity : 0},'fast');
				});
	jQuery('.ca-container').hover(function(){
					jQuery(this).children('.ca-nav').stop().animate({opacity : 1},'fast');
					}, function(){
					jQuery(this).children('.ca-nav').stop().animate({opacity : 0},'fast');
				});
				jQuery('.ca-container-slider').hover(function(){
					jQuery(this).children('.ca-nav').stop().animate({opacity : 1},'fast');
					}, function(){
					jQuery(this).children('.ca-nav').stop().animate({opacity : 0},'fast');
				});
				jQuery('.cn-list').hover(function(){
					jQuery(this).children('.ca-nav').stop().animate({opacity : 1},'fast');
					}, function(){
					jQuery(this).children('.ca-nav').stop().animate({opacity : 0},'fast');
				});
				jQuery('.readon_standard').hover(function(){
					jQuery(this).children('.readon_hide').stop().animate({opacity : 1},'fast');
					}, function(){
					jQuery(this).children('.readon_hide').stop().animate({opacity : 0},'fast');
				});
				
	
	
				jQuery('.nav-prev').hover(function(){
					jQuery(this).find('.previous_post_link').stop().animate({width : 'show'},'fast');
					
					}, function(){
					jQuery(this).find('.previous_post_link').stop().animate({width : 'hide'},'fast');
					
				});
				jQuery('.nav-next').hover(function(){
					jQuery(this).find('.next_post_link').stop().animate({width : 'show'},'fast');
					
					}, function(){
					jQuery(this).find('.next_post_link').stop().animate({width : 'hide'},'fast');
					
				});
	
	
	jQuery('.ca-item-main').hover(function(){
					jQuery(this).children('.ca-icon').stop().animate({opacity : 0},'fast');
						jQuery(this).children('.ca-content-wrapper').stop().animate({opacity : 1},'fast');
					}, function(){
					jQuery(this).children('.ca-icon').stop().animate({opacity : 1},'fast');
						jQuery(this).children('.ca-content-wrapper').stop().animate({opacity : 0},'fast');
				});
	jQuery('.blog_thumb_standard').hover(function(){
					jQuery(this).find('.rt-image').stop().animate({opacity : 0.5},'fast');
						
					}, function(){
					jQuery(this).find('.rt-image').stop().animate({opacity : 1},'fast');
				});

/* Search

********************************************************************************** */


	
	jQuery('.accordiondiv').slideUp('slow');
	jQuery('.accordiondiv:first').parent().addClass('current');
	jQuery('.accordiondiv:first').slideToggle('slow');
	jQuery('ul#accordion a.heading').click(function() {
		jQuery(this).css('outline','none');
		if(jQuery(this).parent().hasClass('current')) {
			jQuery(this).siblings('div').slideUp('slow',function() {
				jQuery(this).parent().removeClass('current');
				
			});
		} else {
			jQuery('ul#accordion li.current div').slideUp('slow',function() {
				jQuery(this).parent().removeClass('current');
			});
			jQuery(this).siblings('div').slideToggle('slow',function() {
				jQuery(this).parent().toggleClass('current');
				
			});
			
		}
		return false;
	});


/* Tabs 

********************************************************************************** */

	jQuery('#tabvanilla > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
	jQuery('#tabvanilla_widget > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
	jQuery('#featuredvid > ul').tabs();
	
	
/* Code for left tabs */


	jQuery('#lefttabvanilla > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
	
	
	
});


/* Menu 

********************************************************************************** */

jQuery(document).ready(
	
    function() {
    "use strict";
        jQuery( ".select-menu" ).change(
            function() { 
                window.location = jQuery(this).find("option:selected").val();
            }
        );
    }
);

/* Walls 

********************************************************************************** */



/* PrettyPhoto 

********************************************************************************** */


       
  jQuery(document).ready(function(){
  "use strict";
		jQuery("a[data-rel^='prettyPhoto']").prettyPhoto({
			animation_speed: 'fast', /* fast/slow/normal */
			slideshow: 5000, /* false OR interval time in ms */
			autoplay_slideshow: false, /* true/false */
			opacity: 0.80, /* Value between 0 and 1 */
			show_title: true, /* true/false */
			allow_resize: true, /* Resize the photos bigger than viewport. true/false */
			default_width: 500,
			default_height: 344,
			counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
			horizontal_padding: 20, /* The padding on each side of the picture */
			hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
			wmode: 'transparent', /* Set the flash wmode attribute */
			autoplay: true, /* Automatically start videos: True/False */
			modal: false, /* If set to true, only the close button will close the window */
			deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */
			overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
			keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */
			changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
			callback: function(){}, /* Called when prettyPhoto is closed */
			ie6_fallback: true,
			markup: '<div class="pp_pic_holder"> \
						<div class="ppt">&nbsp;</div> \
						<div class="pp_top"> \
							<div class="pp_left"></div> \
							<div class="pp_middle"></div> \
							<div class="pp_right"></div> \
						</div> \
						<div class="pp_content_container"> \
							<div class="pp_left"> \
							<div class="pp_right"> \
								<div class="pp_content"> \
									<div class="pp_loaderIcon"></div> \
									<div class="pp_fade"> \
										<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
										<div class="pp_hoverContainer"> \
											<a class="pp_next" href="#">next</a> \
											<a class="pp_previous" href="#">previous</a> \
										</div> \
										<div id="pp_full_res"></div> \
										<div class="pp_details"> \
											<div class="pp_nav"> \
												<a href="#" class="pp_arrow_previous">Previous</a> \
												<p class="currentTextHolder">0/0</p> \
												<a href="#" class="pp_arrow_next">Next</a> \
											</div> \
											<p class="pp_description"></p> \
											{pp_social} \
											<a class="pp_close" href="#">Close</a> \
										</div> \
									</div> \
								</div> \
							</div> \
							</div> \
						</div> \
						<div class="pp_bottom"> \
							<div class="pp_left"></div> \
							<div class="pp_middle"></div> \
							<div class="pp_right"></div> \
						</div> \
					</div> \
					<div class="pp_overlay"></div>',
			gallery_markup: '<div class="pp_gallery"> \
								<a href="#" class="pp_arrow_previous">Previous</a> \
								<div> \
									<ul> \
										{gallery} \
									</ul> \
								</div> \
								<a href="#" class="pp_arrow_next">Next</a> \
							</div>',
			image_markup: '<img id="fullResImage" src="{path}" />',
			flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
			quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',
			iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
			inline_markup: '<div class="pp_inline">{content}</div>',
			custom_markup: '',
			social_tools: '<div class="pp_social"><div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&href='+location.href+'&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div></div>' /* html or false to disable */
		});
	});
	